package com.tjrac.zhaopin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tjrac.zhaopin.bean.PostResumeStatusResp;
import com.tjrac.zhaopin.entity.PostInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PostInfoMapper extends BaseMapper<PostInfo> {
    @Select("SELECT " +
            "job_list.job_name," +
            "job_list.job_descrip," +
            "job_list.salary_min," +
            "job_list.salary_max," +
            "job_list.tag," +
            "job_list.region," +
            "job_list.posted_num," +
            "post_info.status as job_check_status " +
            "FROM " +
            "job_list " +
            "INNER JOIN post_info ON job_list.id = post_info.job_id " +
            "WHERE " +
            "post_info.hunter_id = #{hunterId, jdbcType=INTEGER}")
    List<PostResumeStatusResp> listPostResumeStatus(@Param("hunterId") Integer hunterId);
}
